package com.ruoyi.recipe.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.recipe.mapper.RecipeImageSyncMapper;
import com.ruoyi.recipe.domain.RecipeImageSync;
import com.ruoyi.recipe.service.IRecipeImageSyncService;
import com.ruoyi.common.core.text.Convert;

/**
 * 菜品图片同步Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-08
 */
@Service
public class RecipeImageSyncServiceImpl implements IRecipeImageSyncService 
{
    @Autowired
    private RecipeImageSyncMapper recipeImageSyncMapper;

    /**
     * 查询菜品图片同步
     * 
     * @param id 菜品图片同步主键
     * @return 菜品图片同步
     */
    @Override
    public RecipeImageSync selectRecipeImageSyncById(Long id)
    {
        return recipeImageSyncMapper.selectRecipeImageSyncById(id);
    }

    /**
     * 查询菜品图片同步列表
     * 
     * @param recipeImageSync 菜品图片同步
     * @return 菜品图片同步
     */
    @Override
    public List<RecipeImageSync> selectRecipeImageSyncList(RecipeImageSync recipeImageSync)
    {
        return recipeImageSyncMapper.selectRecipeImageSyncList(recipeImageSync);
    }

    /**
     * 新增菜品图片同步
     * 
     * @param recipeImageSync 菜品图片同步
     * @return 结果
     */
    @Override
    public int insertRecipeImageSync(RecipeImageSync recipeImageSync)
    {
        return recipeImageSyncMapper.insertRecipeImageSync(recipeImageSync);
    }

    /**
     * 修改菜品图片同步
     * 
     * @param recipeImageSync 菜品图片同步
     * @return 结果
     */
    @Override
    public int updateRecipeImageSync(RecipeImageSync recipeImageSync)
    {
        return recipeImageSyncMapper.updateRecipeImageSync(recipeImageSync);
    }

    /**
     * 批量删除菜品图片同步
     * 
     * @param ids 需要删除的菜品图片同步主键
     * @return 结果
     */
    @Override
    public int deleteRecipeImageSyncByIds(String ids)
    {
        return recipeImageSyncMapper.deleteRecipeImageSyncByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除菜品图片同步信息
     * 
     * @param id 菜品图片同步主键
     * @return 结果
     */
    @Override
    public int deleteRecipeImageSyncById(Long id)
    {
        return recipeImageSyncMapper.deleteRecipeImageSyncById(id);
    }
}
